// 3_6_1
//factorial recursion version
#include<iostream>
unsigned int factorial( unsigned int );
int main()
{
	unsigned int n = 0;
	std::cout << "Enter n: ";
	std::cin >> n;
	if( n >= 0 ){
	std::cout << n << "!= " << factorial(n) << std::endl;
	}
	else {
		std::cerr << "Enter possitive number: ";
	}
	return 0;
}
unsigned int factorial(unsigned int f )
{  
	if( f <= 1 )
	return 1;
	if( f >= 2)
	{
		 return ( f * factorial( f - 1 ) );
	}
}
